import React, { Component } from 'react'
import connect from '../../../store/connect'
import Banner from './recommend/Banner'
import MidCategory from './recommend/MidCategory'
import ActivityCategory from './recommend/ActivityCategory'
import Activity from './recommend/Activity'
import TimeLimit from './recommend/TimeLimit'
import NewProducts from './recommend/NewProducts'
import HotProducts from './recommend/HotProducts'
import GoodThings from './recommend/GoodThings'
import FooterBar from './recommend/FooterBar'

class Recommend extends Component {
    render() {
        return (
            <div>
                {/* <HeaderBar topCategory={this.props.data.TOP_CATEGORY}></HeaderBar> */}
                <Banner banner={this.props.data.index}></Banner>
                <MidCategory midCategory={this.props.data.MIDDLE_CATEGORY}></MidCategory>
                <ActivityCategory activityCategory={this.props.data.ACTIVITY_CATEGORY}></ActivityCategory>
                <div style={{marginBottom:"0.6rem"}}>
                    <img style={{width:"100%"}} src={this.props.data&&this.props.data.index&&this.props.data.index.RECOMMEND_ACTIVITY[0].img} alt=""/>
                </div>
                <Activity activity={this.props.data.index}></Activity>
                <TimeLimit timelimit={this.props.data.index}></TimeLimit>
                <NewProducts new={this.props.data.index}></NewProducts>
                <HotProducts hot={this.props.data.index}></HotProducts>
                <GoodThings goods={this.props.data.index}></GoodThings>
                <FooterBar></FooterBar>
            </div>
        )
    }
    componentDidMount(){
        this.props.loaddata()
    }
}
export default connect(Recommend)